const readline = require('readline')
const sha1 = require('sha1')
const config = require('config-lite')(__dirname)
const Mongolass = require('mongolass')
const mongolass = new Mongolass(config.mongodb)

const Admin = mongolass.model('Admin', {
    name: {type: 'string', required: true},
    password: {type: 'string', required: true}
})

Admin
    .findOne({name: 'admin'})
    .exec()
    .then(user => {
        console.log(user)
    })